<template>
  <div style="position:relative;height: 50px;">
    <div class="title">
      <span> {{title}} </span>
    </div>
    <div style="position:absolute;right: 5px;top:5px;">
      <el-button icon="ele-Search" @click="search" v-if="find">手工找单</el-button >
      <el-button icon="ele-Search" @click="dorefresh" v-if="refresh">刷新</el-button >
    </div>
  </div>
</template>

<script>
// 顶部标题栏
export default {
  name: "deliverTopBar",
  props: {
    title: {type: String, default: '标题'},
    find: {type: Boolean, default: false},
    refresh: {type: Boolean, default: false},
  },
  data () {
    return {
    }
  },
  methods: {
    search () {
      this.$emit('search')
    },
    dorefresh () {
      this.$emit('dorefresh')
    }
  }
}
</script>

<style scoped lang="scss">
.title {
  background-color: rgba(0,0,0,0.1);padding: 10px 0;
  text-align: center;
  span {
    font-size: 22px;font-weight: bold;color: #339999;
  }
}
</style>
